1. Field of the Invention
The present invention relates to an interpolating function generating apparatus and method, a digital-analog converter, a data interpolator, a program, and a record medium. In particular, it relates to a technology for interpolating discrete digital data to convert it into continuous analog signals.
2. Description of the Related Art
In a digital audio device such as a CD (compact disk) player, a DVD (digital video disk) player, etc., a digital-analog converter (D/A converter) to which an oversampling technology is applied is used to obtain a continuous analog audio signal from discrete digital audio data. In this type of D/A converter, data interpolation is performed normally by using a digital filter to raise a pseudo-sampling frequency by interpolating data among discretely input digital data.
Normally, a data interpolating process using a digital filter contained in a D/A converter is performed in a convolution arithmetic using a sampling function referred to as a sinc function. FIG. 1 is an explanatory view of a sinc function. A sinc function appears when a Dirac delta function is inversely Fourier transformed, and can be defined by sin (?ft)/(?ft) where a sampling frequency is represented by f. The value of the sinc function is 1 only at the sampling point of t=0, and the value is 0 at any other sampling points.
FIG. 2 shows a relationship between the discrete data and interpolation values in the data. In FIG. 2, the values of the discrete data at the respective sampling points t1, t2, t3, and t4 arranged at equal intervals are Y (t1), Y (t2), Y (t3), and Y (t4), and the interpolation value y corresponding to a predetermined position to (at a distance a from t2) between the sampling points t2 and t3 is obtained as follows.
Normally, when the interpolation value y is obtained by using a sampling function, the value of the sampling function at the interpolation position t0 is obtained for each piece of given discrete data, and a convolution arithmetic is performed by using the obtained values. Practically, the peak in the central position of the sampling function is set at the same level for each sampling point of t1 to t4, and the value (indicated by ?) of the sampling function at each interpolation position to is obtained and added up.
Although the interpolation position t0 changes with a lapse of time, the level of each sampling position also changes with a lapse of time. Therefore, the interpolation value y (t0) also continuously changes, thereby obtaining continuous analog signals smoothly connecting each piece of discrete data.
However, with the conventional D/A converter using the above mentioned oversampling technology, a stepwise signal waveform is obtained by interpolation, and passes through a low pass filter, thereby generating smooth analog signals. Therefor, there has been the problem that the deterioration of phase characteristic is superposed by the low pass filter on the output analog signals.
Furthermore, since the above mentioned sinc function converges into 0 at ??, it is necessary to obtain the values of the sinc functions for all pieces of discrete data and then perform a convolution addition when a correct interpolation value is to be obtained. However, practically with the performance, the circuit scale, etc. taken into account, the range of the discrete data is limited in performing a process using a digital filter. Therefore, an obtained interpolation value includes an abortion error, thereby failing in obtaining a correct interpolation value.
The present invention has been achieved to solve the above mentioned problems, and aims at generating smooth analog signals free of deterioration in phase characteristic by a low pass filter or free of distortion of waveform by abortion error in the interpolation performed using a sinc function.
The present invention also aims at obtaining an interpolating function for use in generating the above mentioned smooth analog signals through a simpler logic or algorithm.
The interpolating function generating apparatus according to the present invention includes: data input means for oversampling a piece of digital data, and obtaining a part of the oversampling data as input data; and arithmetic means for processing the input data obtained from the data input means using a digital basic waveform, and obtaining an interpolating function by performing a moving-average calculation or a convolution arithmetic on the processed digital data.
According to another aspect of the present invention, the data input means can obtain a first half or a second half of the oversampling data as the input data.
According to a further aspect of the present invention, the arithmetic means includes: first addition means for adding the digital data processed using the digital basic waveform to several pieces of data obtained by shifting the processed data by the phase of an oversampling cycle to perform the moving-average calculation or the convolution arithmetic; second addition means for adding up several pieces of data obtained by shifting the digital data processed using the digital basic waveform by the phase of an oversampling cycle; and third addition means for adding up the outputs of the first addition means and the second addition means.
The interpolating function generating method according to the present invention includes: a first step of oversampling a piece of digital data, and obtaining a part of the oversampling data as input data; a second step of processing the input data using a digital basic waveform; and a third step of obtaining an interpolating function by performing a moving-average calculation or a convolution arithmetic on the digital data processed using the digital basic waveform.
According to another aspect of the present invention, a first half or a second half of the oversampling data as the input data can be obtained in the first step.
According to a further aspect of the present invention, in the third step, the digital data processed in the second step is added to several pieces of data obtained by shifting the processed digital data by the phase of the oversampling cycle, the several pieces of data obtained by shifting the digital data processed using the digital basic waveform by the phase of the oversampling cycle are added up, and the addition results are further added up.
The digital-analog converter according to the present invention includes: data input means for oversampling each of plural pieces of discrete data and obtaining a part of the oversampling data as input data for each piece of the discrete data; and arithmetic means for processing the input data obtained by the data input means using a digital basic waveform, and combining the processed digital data in a moving-average calculation or a convolution arithmetic, thereby obtaining an interpolation value for the discrete data.
According to a further aspect of the present invention, the data input means oversamples each of the plural pieces of discrete data provided for each clock of a predetermined frequency, and obtains a part of the oversampling data as the input data for each clock period sectioned by the clock of the predetermined frequency.
According to another aspect of the present invention, the data input means can obtain a first half or a second half of the oversampling data as the input data for each clock period.
According to a further aspect of the present invention, the arithmetic means includes: first addition means for adding the digital data processed using the digital basic waveform to several pieces of data obtained by shifting the processed data by the phase of an oversampling cycle to perform the moving-average calculation or the convolution arithmetic; second addition means for adding up several pieces of data obtained by shifting the digital data processed using the digital basic waveform by the phase of an oversampling cycle; and third addition means for adding up the outputs of the first addition means and the second addition means.
The data interpolator according to the present invention includes: data input means for oversampling each of plural pieces of discrete data and obtaining a part of the oversampling data as input data for each piece of the discrete data; and arithmetic means for processing the input data obtained by the data input means using a digital basic waveform, and combining the processed digital data in a moving-average calculation or a convolution arithmetic, thereby obtaining an interpolation value for the discrete data.
According to a further aspect of the present invention, the data input means oversamples each of the plural pieces of discrete data provided for each clock of a predetermined frequency, and obtains a part of the oversampling data as the input data for each clock period sectioned by the clock of the predetermined frequency.
According to a further aspect of the present invention, the data input means can obtain a first half or a second half of the oversampling data as the input data for each clock period.
According to a further aspect of the present invention, the arithmetic means includes: first addition means for adding the digital data processed using the digital basic waveform to several pieces of data obtained by shifting the processed data by the phase of an oversampling cycle to perform the moving-average calculation or the convolution arithmetic; second addition means for adding up several pieces of data obtained by shifting the digital data processed using the digital basic waveform by the phase of an oversampling cycle; and third addition means for adding up the outputs of the first addition means and the second addition means.
The interpolating function generating program according to the present invention is used to direct a computer to function as data input means for oversampling a piece of digital data, and obtaining a part of the oversampling data as input data; and arithmetic means for processing the input data obtained from the data input means using a digital basic waveform, and obtaining an interpolating function by performing a moving-average calculation or a convolution arithmetic on the processed digital data.
The data interpolating program according to the present invention is used to direct a computer to function as data input means for oversampling each of plural pieces of discrete data and obtaining a part of the oversampling data as input data for each piece of the discrete data; and arithmetic means for processing the input data obtained by the data input means using a digital basic waveform, and combining the processed digital data in a moving-average calculation or a convolution arithmetic, thereby obtaining an interpolation value for the discrete data.
The computer-readable record medium according to the present invention records a program for directing a computer to function as each means as set forth in claim 15 or 16.
The present invention obtains an interpolation value by oversampling input digital data, and performing a moving-average calculation or a convolution arithmetic while processing the oversampling data using a digital basic waveform as described above. Since continuous interpolation values can be obtained only by performing the above mentioned digital process, smooth analog signals can be obtained as a result of D/A conversions on the values without a low pass filter, and without the deterioration of the phase characteristic by the filter. Furthermore, since the function generated using a digital basic waveform according to the present invention is a finite sampling function, the number of pieces of discrete data required to obtain an interpolation value can be reduced. Furthermore, although the number of pieces of discrete data to be processed is reduced, no abortion errors occur, thereby minimizing the distortion of an output waveform. Therefore, the quality of an output analog audio signal can be largely improved.
Furthermore, according to the present invention, a part of oversampling data is obtained as input data, and a process using a digital basic waveform, and a moving-average calculation or a convolution arithmetic are performed using a part of the oversampling data. Therefore, the process using a digital basic waveform, and a moving-average calculation or a convolution arithmetic can be performed in the simplest process. As a result, when the present invention is configured by hardware, it can be realized by an easier logic, thereby minimizing the circuit scale. When the present invention is configured by software, it can be realized by the simplest algorithm, thereby reducing the load of the process and performing the arithmetic operations at a higher speed.